/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package syntacticanalyzer;

import java.util.HashMap;

/**
 *
 * @author Thiago
 */
public class Grammar {

    private HashMap<String, Production> grammar;

    public Grammar() {
        this.grammar = new HashMap<>();
    }

    public Grammar(HashMap<String, Production> grammar) {
        this.grammar = grammar;
    }

    public void put(String key, Production p) {
        this.grammar.put(key, p);
    }

    public Production get(String key) {
        return this.grammar.get(key);
    }

    public HashMap<String, Production> getGrammar() {
        return grammar;
    }

    public void setGrammar(HashMap<String, Production> grammar) {
        this.grammar = grammar;
    }
}
